/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package manager;

import entity.Department;
import iface.IManagerDisabled;
import java.util.ArrayList;

/**
 *
 * @author Noi
 */
public class DisabledDepartmentManager implements IManagerDisabled<Department> {

    private ArrayList<Department> alDepartment;
    private Manager manager;
    
    public DisabledDepartmentManager(Manager manager) {
        this.manager = manager;
    }
    
    @Override
    public void add(Department obj) {
        this.add(obj);
    }

    @Override
    public void recovery(int index) {
        Department department = (Department)this.alDepartment.remove(index);
        department.setStatus(true);
        this.manager.getDepartmentManager().add(department);
    }

    @Override
    public Department get(int index) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
